﻿@{
    Layout = null;
}

<h2 class="page-header">Configurations</h2>
<div class="row-fluid" data-ng-init="init()">
    <div class="span2">
        <tabset vertical="true" type="pills">
            <tab heading="Multicast Endpoints" ng-click="getEndpoints()"></tab>
            <tab heading="Data Fusion" ng-click="getFusionParameter()"></tab>
            <tab heading="Security" ng-click="getSecurityParameter()"></tab>
        </tabset>
    </div>
    <div class="span10">
        <div class="ng-hide" data-ng-show="endpointList">
                <h3><span class="glyphicon glyphicon-asterisk" /> Endpoints</h3>
                <div class="grid-endpoints" data-ng-grid="endpointGrid" />
                <button type="button" class="btn btn-primary btn-small"><span class="glyphicon glyphicon-plus-sign" /> Add</button>
                <button type="button" class="btn btn-danger btn-small"><span class="glyphicon glyphicon-minus-sign" /> Delete</button>
                <button type="button" class="btn btn-inverse btn-small"><span class="glyphicon glyphicon-ban-circle" /> Disable</button>
        </div>
        <div class="ng-hide endpoint-details" data-ng-show="selectedEndpoint">
            <div class="well well-small">
                <form class="form-horizontal" role="form">
                    <div class="form-group">
                        <label for="name" class="col-sm-2 control-label">Name</label>
                        <div class="col-sm-10">
                            <input type="text" class="form-control" data-ng-model="selectedEndpoint.name" />
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="address" class="col-sm-2 control-label">IP</label>
                        <div class="col-sm-3">
                            <input type="text" class="form-control" data-ng-model="selectedEndpoint.address" />
                        </div>
                        
                        <label for="port" class="col-sm-1 control-label">Port</label>
                        <div class="col-sm-2">
                            <input type="number" class="form-control" data-ng-model="selectedEndpoint.port" />
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="buffer" class="col-sm-2 control-label">Buffer</label>
                        <div class="col-sm-2">
                            <input type="number" class="form-control" data-ng-model="selectedEndpoint.buffer" />
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="category" class="col-sm-2 control-label">Category</label>
                        <div class="col-sm-2">
                            <input type="text" class="form-control" data-ng-model="selectedEndpoint.category" />
                        </div>
                        
                        <label for="edition" class="col-sm-1 control-label">Edition</label>
                        <div class="col-sm-2">
                            <input type="text" class="form-control" data-ng-model="selectedEndpoint.edition" />
                        </div>
                    </div>
                    <div class="form-group">
                        <div class="col-sm-offset-2 col-sm-10">
                            <button type="submit" class="btn btn default">SUBMIT</button>
                        </div>
                    </div>
                </form>
            </div>
        </div>

        <div class="ng-hide" data-ng-show="fusionParameter">
            <form class="well well-large form-horizontal" role="form">
                <div class="form-group">
                    <label for="sic" class="col-sm-2 control-label">SIC</label>
                    <div class="col-sm-2">
                        <input type="number" class="form-control" data-ng-model="fusionParameter.sic" />
                    </div>
                    <label for="sac" class="col-sm-1 control-label">SAC</label>
                    <div class="col-sm-2">
                        <input type="number" class="form-control" data-ng-model="fusionParameter.sac" />
                    </div>
                </div>
                <div class="form-group">
                    <label for="posResolution" class="col-sm-2 control-label">Longitudinal</label>
                    <div class="col-sm-2">
                        <input type="text" class="form-control" data-ng-model="fusionParameter.posResolution" />
                    </div>
                </div>
                <div class="form-group">
                    <label for="altResolution" class="col-sm-2 control-label">Vertical</label>
                    <div class="col-sm-2">
                        <input type="text" class="form-control" data-ng-model="fusionParameter.altResolution" />
                    </div>
                </div>
                <div class="form-group">
                    <label for="fRate" class="col-sm-2 control-label">Fusion Rate</label>
                    <div class="col-sm-2">
                        <input type="number" class="form-control" data-ng-model="fusionParameter.fusionRate" />
                    </div>
                    <label for="predictionTime" class="col-sm-2 control-label">Prediction Time</label>
                    <div class="col-sm-2">
                        <input type="number" class="form-control" data-ng-model="fusionParameter.predictionTime" />
                    </div>
                </div>
                <div class="form-group">
                    <div class="col-sm-offset-2 col-sm-10">
                        <button type="submit" class="btn btn default">SUBMIT</button>
                    </div>
                </div>
            </form>
        </div>

        <div class="ng-hide" data-ng-show="securityParameter">
            <form class="well well-large" role="form">
                <div class="form-group">
                    <label for="publicKeyPath">Public Key Directory:</label>
                    <input type="text" class="form-control" data-ng-model="securityParameter.publicKeyPath" />
                </div>
                <div class="form-group">
                    <label for="privateKeyPath">Private Key Directory:</label>
                    <input type="text" class="form-control" data-ng-model="securityParameter.privateKeyPath" />
                </div>
                
                <div class="form-group">
                    <label for="pkiType">PKI Type</label>
                    <select style="width:50px" class="form-control" data-ng-model="securityParameter.pkiType" data-ng-options="p.id as p.name for p in pkiTypeList"></select>
                </div>
                
                <div class="form-group">
                    <label for="caUrl">Certificate Authority (CA) URL</label><span class="text-muted"> ex. http://localhost:1234/CA.svc</span>
                    <input type="text" class="form-control" placeholder="CA Service URL" data-ng-model="securityParameter.caUrl" />
                </div>
                
                <div class="form-group">
                    <label for="raUrl">Registration Authority (RA) URL</label><span class="text-muted"> ex. http://localhost:1234/RA.svc</span>
                    <input type="text" class="form-control" placeholder="RA Service URL" data-ng-model="securityParameter.raUrl" />
                </div>
                
                <div class="form-group">
                    <label for="vaUrl">Verification Authority (VA) URL</label><span class="text-muted"> ex. http://localhost:1234/VA.svc</span>
                    <input type="text" class="form-control" placeholder="VA Service URL" data-ng-model="securityParameter.vaUrl" />
                </div>
                <br /><button type="submit" class="btn btn default">SUBMIT</button>
            </form>
        </div>
    </div>
</div>
